package vip.xumy.picture.conf;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import vip.xumy.admin.sys.service.ConfigService;

/**
 * @author:mengyxu
 * @date:2020年3月25日
 */

@Component
@Configuration
public class PictureApplicationRunner implements ApplicationRunner {
	private static final String HOST_CFG_KEY = "host_url";
	public static Map<String, String> CONF_MAP = new HashMap<>();;

	@Autowired
	public void setConfigService(ConfigService configService) {
		CONF_MAP.put("host", configService.getStringConfig(HOST_CFG_KEY, null));
	}

	@Override
	public void run(ApplicationArguments args) throws Exception {
		// TODO Auto-generated method stub

	}

}
